<?php
namespace Admin\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){    
          $this->time();    
       if(isset($_SESSION['username']) && $_SESSION['username'] != '') {         
          $this->display();
       } else {
          $this->redirect('Login/login');
       }          
    }
   
    public function time() {
        $tme=time();
        $date=date("Y-m-d H:i:d",$tme);
        $this->assign('time',$date);    
    }
}

